#!/usr/bin/env python3
# -*- coding:utf-8 -*-

# https://blog.csdn.net/zengxiantao1994/article/details/76588580
# Python绘图Turtle库详解

import turtle
import time


# 五角星
def five_pointed_star_1():
    printer = turtle.Turtle()
    printer.pensize(5)
    printer.pencolor("red")
    printer.forward(200)
    for i in range(4):
        printer.right(144)
        printer.fd(200)
    turtle.done()


# 五角星
def five_pointed_star_2():
    printer = turtle.Turtle()
    printer.pensize(5)
    printer.pencolor("yellow")
    printer.fillcolor("red")

    printer.begin_fill()
    for _ in range(5):
        printer.forward(200)
        printer.right(144)
    printer.end_fill()
    time.sleep(2)

    printer.penup()
    printer.goto(-150, -120)
    printer.color("violet")
    printer.write("Done", font=('Arial', 40, 'normal'))

    turtle.Screen().mainloop()


def main():
    five_pointed_star_2()


if __name__ == "__main__":
    main()
